package com.woniuxy01;

import java.util.Scanner;

/**
 * @author 作者
 * @create 2025-05-28 10:14
 */
public class MyUtil01 {

    public void wash01(){
        System.out.println("启动洗衣机");
        Scanner sc = new Scanner(System.in);
        System.out.println("放入要洗的衣物");
        String str = sc.next();
        System.out.println("开始洗："+str);
        System.out.println("洗衣结束");
    }
    public void wash02(String str){
        System.out.println("启动洗衣机");
        System.out.println("开始洗："+str);
        System.out.println("洗衣结束");
    }

    public void printGraph01(){
        Scanner sc = new Scanner(System.in);
        System.out.println("输入你要打印的符号");
        String str = sc.next();
        for(int i=1;i<=1;i++){
            for(int j=1;j<=9;j++){
                System.out.print(str);
            }
            System.out.println();
        }
    }
    //带参方法
    public void printGraph02(String str){
        for(int i=1;i<=1;i++){
            for(int j=1;j<=9;j++){
                System.out.print(str);
            }
            System.out.println();
        }
    }
    public void printGraph03(int row,int col,String str){
        for(int i=1;i<=row;i++){
            for(int j=1;j<=col;j++){
                System.out.print(str);
            }
            System.out.println();
        }
    }

    public void test01(int x,int y){
        int t=x;
        x=y;
        y=t;
        System.out.println("方法中：x="+x+"y="+y);
    }

    public void test02(int x){
        x+=10;
    }
    public void test03(int[] a){
        for(int i=0;i<a.length;i++){
            a[i]+=10;
        }
    }
    public void test04(int[] a){
        a=new int[5];
        for(int i=0;i<a.length;i++){
            a[i]+=10+i;
        }
    }


}
